package com.settlement.system.converter;

import com.alibaba.excel.converters.string.StringStringConverter;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.ReadCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import org.apache.commons.lang3.StringUtils;


/**
 * @author author
 */
public class WpOxoRefundDetailConvert extends StringStringConverter {

    @Override
    public String convertToJavaData(ReadCellData cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration){
        String value = cellData.getStringValue();
        final int fourteen = 14;
        if(!StringUtils.isEmpty(value) && value.length()>=fourteen){
            return value.substring(0,14);
        }
        return value;
    }

}
